setInterval(function(){
    var imgObj=document.createElement('img')
    imgObj.src='./star.gif'
    var min=20
    var max=100
    imgObj.width=Math.floor(Math.random()*(max-min+1)+min)
    imgObj.style.position='absolute'
    var min=0
    var max=(window.innerWidth||document.documentElement.clientWidth)
    imgObj.style.left=Math.floor(Math.random()*(max-min+1)+min)+'px'
    var max=(window.innerHeight||document.documentElement.clientHeight)
    imgObj.style.top=Math.floor(Math.random()*(max-min+1)+min)+'px'
    document.body.appendChild(imgObj)
},1000)

  setInterval(function() {
    var num = parseInt(document.querySelector('.num').style.width)
    num--
    document.querySelector('.num').style.width = num + '%'
}, 1000)  

var bodyObj=document.body
bodyObj.onclick=function(evt){
    var e=evt ||window.event
    var target=e.target||e.srcElement
    if(target.nodeName==='IMG'){
        bodyObj.removeChild(target)
    }
}